<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp '&#160;'>
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html">
    <xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:variable name="x" select="0" />
	<xsl:choose>
		<xsl:when test="Patron/Item">
			<xsl:for-each select="Patron/Item[string-length( EndRequestDate / text() ) > 0]">
				<tr>
					<xsl:if test="(position() mod 2 = 1)">
						<xsl:attribute name="style">background-color:#E6E6E6</xsl:attribute>
					</xsl:if>
					<td>
						<a>
							<xsl:attribute name="href">http://aleph.uea.ac.uk/F?func=direct&amp;local_base=UEA01&amp;doc_number=<xsl:value-of select="ItemID"/></xsl:attribute>
							<xsl:value-of select="Title"/></a>&nbsp;
					</td>
					<td><xsl:value-of select="Author"/>&nbsp;</td>
					<td>
						<xsl:variable name="FormattedEndRequestDate" select="concat(substring(EndRequestDate,9,2),'-',substring(EndRequestDate,6,2),'-',substring(EndRequestDate,1,4))" />
						<xsl:value-of select="$FormattedEndRequestDate" />&nbsp;
					</td>
				</tr>
			</xsl:for-each>
		</xsl:when>
	</xsl:choose>
</xsl:template>
</xsl:stylesheet>